package org.slicerj.core;

public class SliceMarker {
	private String methodDescription;
	private int lineNumber;
	private String location;
	private String filename;
	private StringBuilder opcode;

	public SliceMarker(String methodDescription, int lineNumber,
			String location, String filename, String newOpcode) {
		
		setMethodDescription(methodDescription);
		setLineNumber(lineNumber);
		setLocation(location);
		setFilename(filename);
		opcode = new StringBuilder(newOpcode);
		appendOpcode(opcode.toString());
	}

	public String getMethodDescription() {
		return methodDescription + "["
				+ getOpcode().substring(0, getOpcode().length() - 2) + "]";
	}

	public void setMethodDescription(String methodDescription) {
		this.methodDescription = methodDescription;
	}

	public int getLineNumber() {
		return lineNumber;
	}

	public void setLineNumber(int lineNumber) {
		this.lineNumber = lineNumber;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getFilename() {
		return filename;
	}

	public void setFilename(String filename) {
		this.filename = filename;
	}

	public String getOpcode() {
		return opcode.toString();
	}

	public void appendOpcode(String newOpcode) {
		opcode.append(newOpcode + ", ");
	}

}
